package com.ksm.zyz.sys.service.impl;


import com.ksm.zyz.sys.entity.Combobox;
import com.ksm.zyz.common.base.BaseServiceImpl;
import com.ksm.zyz.sys.entity.ExtTree;
import com.ksm.zyz.sys.entity.SysUser;
import com.ksm.zyz.sys.mapper.SysUserMapper;
import com.ksm.zyz.sys.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Set;

@Service("sysUserService")
public class SysUserServiceImpl extends BaseServiceImpl<SysUser> implements SysUserService {

	@Autowired
	private SysUserMapper sysUserMapper;

	@Override
	public Set<String> findRoles(String loginName) {
		return sysUserMapper.findRoles(loginName);
	}

	@Override
	public Set<String> findPermission(String loginName) {
		return sysUserMapper.findPermission(loginName);
	}

	@Override
	public SysUser findByLoginName(String loginName) {
		return sysUserMapper.findByLoginName(loginName);
	}

	@Override
	public SysUser checkLogin(String loginName, String password) {
		return sysUserMapper.checkLogin(loginName,password);
	}

	@Override
	public int checkLoginName(SysUser sysUser) {
		return sysUserMapper.checkLoginName(sysUser);
	}

	@Override
	public List<ExtTree> findMenuInfo(String roleId) {
		return sysUserMapper.findMenuInfo(roleId);
	}

	@Override
	public void resetPwd(String password, String userId) {
		sysUserMapper.resetPwd(password,userId);
	}

	@Override
	public List<Combobox> getCombobox(String label) {
		return sysUserMapper.getCombobox(label);
	}


}
